import { defineStore } from "pinia";
import { createOne, queryAll, deleteOne, queryOne, updateOne, queryList } from "../api/draft";
import Validator from '@/utils/Validator';
const useDraftStore = defineStore('draft',()=>{
    function setDraft(formId,formJsonStr){
        return new Promise(function(resolve,reject){
            createOne({
                formId,
                formJsonStr
            }).then(res=>{
                resolve(res)
            })
        })
    }
    return {setDraft}
})
export default useDraftStore;